#include <fstream>
#include <iostream>

using namespace std;

int main()
{
    ofstream outfile("seq_data.txt");
    if (!outfile)
        cout << "Cannot open the file !" << endl;
    else
    {
        cout << "File opened !" << endl;
        outfile << "anan" << " " << "17" << " " << "32" << endl
                << "mary" << " " << "45" << " " << "84" << endl;
    }
    
    ifstream infile("seq_data.txt");
    if (!infile)
        cout << "Cannot read the file !";
    else
    {
        string name[2];
        int nt[2];
        int nc[2];
        int index = 0;

        while (infile >> name[index])
        {
            infile >> nt[index] >> nc[index];
            cout << name[index] << " " << nt[index] << " " << nc[index] << endl;
            index++;
            // cout << name << " "<< nt << " " << nc << endl;
        }  
    }

    return 0;
}